// Copyright (c) 2020 Presto Labs Pte. Ltd.
// Author: donggu

#pragma once

#include "coin2/exchange/base/executor/packet.h"
#include "coin2/exchange/base/feed/update.h"
#include "coin2/exchange/base/feed_util/bbo_container.h"
#include "coin2/exchange/base/symbology/product.h"
#include "coin2/exchange/base/feed/timer/timer.h"

namespace coin2::feed::mgr::impl {
class FeedSubsystemManager;
}

namespace coin2::exchange::base::feed {
using coin2::exchange::base::symbology::IProduct;
using coin2::exchange::base::feed::timer::FeedTimer;

class IFeedSubscriber {
 public:
  typedef typename IProduct::TKey TKey;

  virtual void InjectFeed(const coin2::feed::mgr::impl::FeedSubsystemManager*) {}
  virtual void onTradeFeed(const FeedUpdate& upd) = 0;
  virtual void onBookFeed(const FeedUpdate& upd) = 0;
  virtual void onLiquidationFeed(const FeedUpdate& upd) = 0;
  virtual void onOpenInterestFeed(const FeedUpdate& upd) = 0;
  virtual void onMarkPriceFeed(const FeedUpdate& upd) = 0;
  virtual void onIndexFeed(const FeedUpdate& upd) = 0;
  virtual void onFundingRateFeed(const FeedUpdate& upd) = 0;
  virtual void onIvGreeksFeed(const FeedUpdate& upd) = 0;
  virtual void onNavFeed(const FeedUpdate& upd) = 0;
  virtual void onKlineFeed(const FeedUpdate& upd) = 0;
  virtual void onWalletFeed(const FeedUpdate& upd) = 0;
  virtual void onMarketAnalysisFeed(const FeedUpdate& upd) = 0;
  virtual void onTopLongShortAccountRatioFeed(const FeedUpdate& upd) = 0;
  virtual void onTopLongShortPositionRatioFeed(const FeedUpdate& upd) = 0;
  virtual void onGlobalLongShortAccountRatioFeed(const FeedUpdate& upd) = 0;
  virtual void onTakerBuySellRatioFeed(const FeedUpdate& upd) = 0;
  virtual void onOpenInterestHistFeed(const FeedUpdate& upd) = 0;
  virtual void onHeartbeatFeed(const FeedTimer& timer) = 0;
  virtual ~IFeedSubscriber() = default;
};

}  // namespace coin2::exchange::base::feed
